package com.lepu.app.fun.index.bean;

import java.util.ArrayList;
import android.content.Context;
import com.lepu.pasm.R;

public class BeanIndexBookItem{
   public String chapter; //章节
   public String title;
   public String loadPath; //加载路径
   public String readContent;  //语音
   

   
   public static ArrayList<BeanIndexBookItem> getBook1(Context context){
	   ArrayList<BeanIndexBookItem> arrayList = new ArrayList<BeanIndexBookItem>();
	   String[] chapterList =  context.getResources().getStringArray(R.array.book1_chapter);
	   String[] titleList = context.getResources().getStringArray(R.array.book1_title);
	   String[] pathList = context.getResources().getStringArray(R.array.book1_path);
	   String[] readList = context.getResources().getStringArray(R.array.book1_read);
	   
	   for(int i=0; i<chapterList.length; i++){
		   BeanIndexBookItem item = new BeanIndexBookItem();
		   item.chapter = chapterList[i];
		   item.title = titleList[i];
		   item.loadPath = pathList[i];
		   item.readContent = readList[i];
		   arrayList.add(item);
	   }
	   
	   return arrayList;
   }
   
   public static ArrayList<BeanIndexBookItem> getBook2(Context context){
	   ArrayList<BeanIndexBookItem> arrayList = new ArrayList<BeanIndexBookItem>();
	   String[] chapterList =  context.getResources().getStringArray(R.array.book2_chapter);
	   String[] titleList = context.getResources().getStringArray(R.array.book2_title);
	   String[] pathList = context.getResources().getStringArray(R.array.book2_path);
	   String[] readList = context.getResources().getStringArray(R.array.book2_read);
	   
	   for(int i=0; i<chapterList.length; i++){
		   BeanIndexBookItem item = new BeanIndexBookItem();
		   item.chapter = chapterList[i];
		   item.title = titleList[i];
		   item.loadPath = pathList[i];
		   item.readContent = readList[i];
		   arrayList.add(item);
	   }
	   
	   return arrayList;
   }
   
}
